<template>
    <div>
        <div class="ui-title">
            <div class="ui-title-back" @click="hideWindow"></div>
            <div class="ui-title-text">书籍信息</div>
           <!-- <div class="ui-title-btn-block">
                <span class="ui-title-btn icon xzr xzr-ico-liebiao " onclick="location.href=location.href"></span>
            </div>-->
        </div>
        <div class="body">
            <div class="book-info">

                <div class="book-info-block">
                    <div class="book-cover index-book-block" style="float:left;">
                        <div class="book-cover-title">{{bookinfo.title}}</div>
                        <div class="book-cover-hr"></div>
                    </div>
                    <div class="book-info-item book-info-title">{{bookinfo.title}}</div>
                    <div class="book-info-item">作者：{{bookinfo.author}}</div>
                    <!--<div class="book-info-item">作者：{{bookinfo.author}}</div>-->
                    <div class="book-info-item book-info-item2">
                        <a href="javascript:" class="book-info-btn" @click="detail({title:bookinfo.title,path:bookinfo.path,id:bookinfo.id})">开始阅读</a>
                    </div>
                    <div class="pub-clear"></div>
                </div>

                <div class="book-info-title2">简介</div>
                <div class="book-info-content">{{bookinfo.content?bookinfo.content:"暂无信息"}}</div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        data: function () {
            return {
               bookinfo:{}
            }
        },
        methods: {
            detail:function(data){
                //plus.storage.setItem('currentBook',JSON.stringify(data));
                window.openWebview({page:'bookdetail',hash:data});
            },
            hideWindow:function(){
                this.bookinfo={};
                window.hideWebview();
            },
            init:function(){
                this.bookinfo=HASH.info;
            }
        },
        mounted: function () {
            this.init();
        }
    }

</script>

